<?php

//追加__ROOT__解析方法----------------------------------------------------------------------------------------------------开始
defined('IS_CGI') or define('IS_CGI', strpos(PHP_SAPI, 'cgi') === 0 ? 1 : 0);
if (IS_CGI) {
    //CGI/FASTCGI模式下
    $_temp = explode('.php', $_SERVER['PHP_SELF']);
    defined('_PHP_FILE_') or define('_PHP_FILE_', rtrim(str_replace($_SERVER['HTTP_HOST'], '', $_temp[0] . '.php'), '/'));
} else {
    defined('_PHP_FILE_') or define('_PHP_FILE_', rtrim($_SERVER['SCRIPT_NAME'], '/'));
}
if (!defined('__ROOT__')) {
    $_root = rtrim(dirname(_PHP_FILE_), '/');
    define('__ROOT__', (($_root == '/' || $_root == '\\') ? '' : $_root));
    defined('__STATIC__') or define('__STATIC__', (($_root == '/' || $_root == '\\') ? '' : $_root . '/static'));
}
//追加__ROOT__解析方法----------------------------------------------------------------------------------------------------结束
defined('ROOT_PATH') or define('ROOT_PATH', __DIR__ . '/../');
//require ROOT_PATH . 'vendor/autoload.php';
require ROOT_PATH . 'framework/start.php';
